﻿using System.Linq;
using System.Text.RegularExpressions;

namespace SemanticEx
{
	public class RegexScope : GenericParameterScope
	{
		#region Constructors

		public RegexScope(Regex regex)
			: base()
		{
			Regex = regex;
			Parameters = Regex.GetGroupNames().Where(x => IsSymbolNameValid(x)).Select(x => CreateSymbol(x, typeof(string)));
		}

		#endregion

		#region Properties

		public Regex Regex { get; private set; }

		#endregion
	}
}